package net.framework.smc.demo.po;

import lombok.Data;
import org.hibernate.annotations.GenericGenerator;
import org.springframework.data.annotation.CreatedBy;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * @authore zyx
 * @date 2018/6/28 15:20
 */
@Data
@Entity
@Table(name = "T_TRIP")
@EntityListeners(AuditingEntityListener.class)
public class Trip implements Serializable {

    @Id
    @GenericGenerator(name = "idGenerator", strategy = "uuid")
    @GeneratedValue(generator = "idGenerator")
    @Column(name = "id")
    private String id;

    @Column(name = "title")
    private String title;

    @Column(name = "start_time")
    private String startTime;

    @Column(name = "end_time")
    private String endTime;

    @Column(name = "create_time")
    @CreatedDate
    private Date createTime = new Date() ;

    @Column(name = "owner")
    private String owner;

    @Column(name = "del_flag")
    private Integer delFlag = 0;

    @Column(name = "status")
    private Integer status = 0;

}
